package com.jacky.launcher;

import android.app.Application;

import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.model.VideoOptionModel;
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager;
import com.shuyu.gsyvideoplayer.player.PlayerFactory;

import java.util.ArrayList;
import java.util.List;

import tv.danmaku.ijk.media.player.IjkMediaPlayer;

public class MyApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        //EXOPlayer内核，支持格式更多
        PlayerFactory.setPlayManager(IjkPlayerManager.class);
//        https://github.com/CarGuo/GSYVideoPlayer/blob/master/doc/QUESTION.md
        List<VideoOptionModel> list = new ArrayList<>();
        VideoOptionModel videoOptionMode01 = new VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1);//不额外优化
        list.add(videoOptionMode01);
        GSYVideoManager.instance().setOptionModelList(list);
    }
}
